package com.oig.base.api;


import com.oig.base.api.factory.HarborServiceFallBackFactory;
import com.oig.sys.base.dto.HarborDto;
import com.oig.sys.base.vo.HarborVo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(contextId="harborService", value="sys-base-server",path="/harbor",fallbackFactory= HarborServiceFallBackFactory.class)
public interface HarborService {

    //@Operation(summary = "根据编码获取口岸")
    @PostMapping(value = "/getByCode")
    HarborVo getByCode(@RequestParam("code") String code);

    //@Operation(summary = "根据名称获取口岸")
    @PostMapping(value = "/getByName")
    HarborVo getByName(@RequestParam("name") String name);

    //@Operation(summary = "根据原code获取口岸")
    @PostMapping(value = "/getByOldCode")
    HarborVo getByOldCode(@RequestParam("oldCode") String oldCode);


    //@Operation(summary = "修改口岸")
    @PostMapping(value = "/updateHarbor")
    HarborVo updateHarbor(@RequestBody HarborDto harborDto);


}
